//
//  SelectedNumberView.m
//  DayAndDayLottery
//
//  Created by dengzhiping on 2017/5/27.
//  Copyright © 2017年 dengzhiping. All rights reserved.
//

#import "SelectedNumberView.h"

@interface SelectedNumberView()

@end

@implementation SelectedNumberView

+ (SelectedNumberView *)initSelectedNumberViewFromXib{
    NSArray *arr = [[NSBundle mainBundle] loadNibNamed:@"SelectedNumberView" owner:self options:nil];

    return [arr firstObject];
}

- (void)viewWithButtonNumTitle:(NSString *)numText bottomLabelTitle:(NSString *)bottomText{
    
    [self.selectedButton setTitle:numText forState:0];
    self.numberLabel.text = bottomText;

}

- (IBAction)selectedButton:(UIButton *)sender {
    sender.selected = !sender.selected;
    if (self.block) {
        self.block(sender);
    }
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
